package com.hibernate.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

@Entity
@Table(name = "users")
public class User implements Serializable{
	/**
	 * 
	 *  
	 */
	private static final long serialVersionUID = 1L;
	
	@Id
	@Column(name = "USER_ID", length = 20, nullable = false)
	private int userId;
	
	@Column(name = "USER_NAME", length = 50, nullable = false, unique = true)
	private String userName;
	
	@Column(name = "PASSWORD", length = 20, nullable = false)
	private String passwords;
	
	@Column(name = "REMARK", length = 100, nullable = true)
	private String remark;
	
	@Column(name = "UPDDATE", nullable = true)
	@Temporal(TemporalType.TIMESTAMP)
	private Date updDate;
	
	@Column(name = "email", length = 50, nullable = true, unique = true)
	private String email;
	
	@Column(name = "age", length = 11, nullable = true)
	private int age;
	
	@Column(name = "RoleId", length = 45, nullable = false)
	private String roleId;

	public int getUserId() {
		return userId;
	}

	public void setUserId(int userId) {
		this.userId = userId;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getPasswords() {
		return passwords;
	}

	public void setPasswords(String passwords) {
		this.passwords = passwords;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public Date getUpdDate() {
		return updDate;
	}

	public void setUpdDate(Date updDate) {
		this.updDate = updDate;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public int getAge() {
		return age;
	}

	public void setAge(int age) {
		this.age = age;
	}

	public String getRoleId() {
		return roleId;
	}

	public void setRoleId(String roleId) {
		this.roleId = roleId;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}
	
	
}